package com.hui.server.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hui.server.entity.Department;
import com.hui.server.util.Result;

import java.sql.SQLException;


/**
 * <p>
 *  服务类
 * </p>
 *
 * @author hui
 * @since 2022-03-31
 */
public interface DepartmentService extends IService<Department> {


    /**
     * 查询所有部门
     * @return
     */
    Result<?> getAllDepartments();

    /**
     * 添加部门，调用存储过程
     * @param department
     * @return
     */
    Result<?> addDep(Department department) throws SQLException;


    /**
     * 删除部门，调用存储过程
     * @param id
     * @return
     */
    Result<?> deleteDep(Integer id) throws SQLException;

    /**
     * 修改部门，只允许修改名字和是否启用
     * @return
     */
    Result<?> updateDepById(Department department);
}
